package dictionary.script;

import java.util.Vector;

public class Test {

	public static void main(String[] args) {
		Vector<Word> listType1 = new Vector<Word>();
		for(int i=0;i<DictionaryInterface.NUCLEUS_ONE.length;i++){
			Word temp = new Type1(DictionaryInterface.NUCLEUS_ONE[i]);
			listType1.add(temp);
		}
		
		Vector<Word> listType2 = new Vector<Word>();
		for(int i=0;i<DictionaryInterface.NUCLEUS.length;i++)
			for(int j=0;j<DictionaryInterface.ENDING.length;j++)
				if(Type2.check(DictionaryInterface.NUCLEUS[i], DictionaryInterface.ENDING[j])){
					Word temp = new Type2(DictionaryInterface.NUCLEUS[i], DictionaryInterface.ENDING[j]);
					listType2.add(temp);
				}
		
		Vector<Word> listType3 = new Vector<Word>();
		for(int i=0;i<DictionaryInterface.INITIAL.length;i++){
			for(int j=0;j<listType1.size();j++)
				if(Type34.check(DictionaryInterface.INITIAL[i], listType1.get(j))){
					Word temp = new Type34(DictionaryInterface.INITIAL[i], listType1.get(j));
					listType3.add(temp);
				}
			for(int j=0;j<listType2.size();j++)
				if(Type34.check(DictionaryInterface.INITIAL[i], listType2.get(j))){
					Word temp = new Type34(DictionaryInterface.INITIAL[i], listType2.get(j));
					listType3.add(temp);
				}
		}
		System.out.println(listType1.size() + listType2.size() + listType3.size());
		for(int i=0;i<listType3.size();i++)
			System.out.println(listType3.get(i).word);
	}

}
